package tech.yangzhijie.basic.knowledge.basic;

import java.util.LinkedList;

public class InitializationSequenceTest {
    public static void main(String[] args) {
        //LinkedList
        Son son = new Son();
    }
}

class Father{
    private static String lastName = "杨";
    static {
        System.out.println("父类静态变量：" + lastName);
        System.out.println("父类静态语句块");
    }
    private String firstName = "志杰";
    {
        System.out.println("父类实例变量：" + firstName);
        System.out.println("父类普通语句块");
    }

    public Father() {
        System.out.println("父类构造方法");
    }
}
class Son extends Father{
    private static String lastName = "杨";
    static {
        System.out.println("子类静态变量：" + lastName);
        System.out.println("子类静态语句块");
    }
    private String firstName = "妍";
    {
        System.out.println("子类实例变量：" + firstName);
        System.out.println("子类普通语句块");
    }

    public Son() {
        System.out.println("子类构造方法");
    }
}
